﻿using System;
using System.Collections.Generic;
using GameFramework.Battle.Core;
using Gameplay.PVE.Utils;
using RootMotion.FinalIK;
using UnityEngine;
using Yoozoo.Libs;
using Yoozoo.Managers;
using Random = System.Random;

namespace Gameplay.PVE.Survivor
{
    public class ModelRenderer: IClass
    {
        protected float speed = 1;
        public virtual void Play(string animName,bool isFullBody = false,bool resetTransition = true)
        {
            
        }
        
        public void OnReset()
        {
            speed = 1;
        }

        public virtual void Update()
        {
            UpdateAiming();
            UpdateBattleState();
        }

        public virtual void Flash()
        {
            
        }
        
        public virtual void SetFlashAmount(float amount)
        {
            
        }
        
        public virtual void SetFloat(string name, float value)
        {
            
        }

        public virtual void SetBool(string name, bool value)
        {
            
        }
        
        public virtual void SetTrigger(string name)
        {
            
        }

        protected bool UpdateValueChange(ref float currentValue,ref float targetValue,float speed)
        {
            return BattleHelper.UpdateValueChange(ref currentValue,ref targetValue,speed);
        }
        
        protected virtual void UpdateAiming()
        {
            
        }

        protected virtual void UpdateBattleState()
        {
            
        }
        
        public virtual void SetAnimatorSpeed(float speed)
        {
            
        }

        public virtual void Dispose()
        {
            
        }

        public virtual void OnDead()
        {
            
        }
    }
}
